﻿namespace KinonekoSoftware.Foundation.Styles
{
    public class DarkThemeSystem : ThemeSystem
    {
        public DarkThemeSystem() : base()
        {
            Colors = new Dictionary<BrushKey, uint>();
            InitializeColors();
        }
        
        protected override void InitializeOverlayBrush(Dictionary<BrushKey, uint> colors)
        {
            colors.TryAdd(BrushKey.Overlay100, FromARGB(0x28, 0xff, 0xff, 0xff));
            colors.TryAdd(BrushKey.Overlay200, FromARGB(0x50, 0xff, 0xff, 0xff));
        }

        protected override void InitializeBackgroundBrush(Dictionary<BrushKey, uint> colors)
        {
            colors.TryAdd(BrushKey.BorderBrush, FromRGB(0x77, 0x7c, 0x88));
            colors.TryAdd(BrushKey.BackgroundLevel1, FromRGB(0x54, 0x57, 0x5F));
            colors.TryAdd(BrushKey.BackgroundLevel2, FromRGB(0x43, 0x46, 0x4C));
            colors.TryAdd(BrushKey.BackgroundLevel3, FromRGB(0x30, 0x31, 0x36));
            colors.TryAdd(BrushKey.BackgroundLevel4, FromRGB(0x24, 0x25, 0x29));
            colors.TryAdd(BrushKey.BackgroundLevel5, FromRGB(0x15, 0x16, 0x18));
            colors.TryAdd(BrushKey.BackgroundLevel6, FromRGB(0x1D, 0x1E, 0x21));
            colors.TryAdd(BrushKey.BackgroundInDisabled, FromRGB(0x3C, 0x3E, 0x44));
        }

        protected override void InitializeForegroundBrush(Dictionary<BrushKey, uint> colors)
        {
            colors.TryAdd(BrushKey.ForegroundLevel1, FromRGB(0xEB, 0xEB, 0xEB));
            colors.TryAdd(BrushKey.ForegroundLevel2, FromRGB(0x8C, 0x8C, 0x8C));
            colors.TryAdd(BrushKey.ForegroundLevel3, FromRGB(0x73, 0x73, 0x73));
            colors.TryAdd(BrushKey.ForegroundOther, FromRGB(0x59, 0x59, 0x59));
            colors.TryAdd(BrushKey.ForegroundInDisabled, FromRGB(0x73, 0x73, 0x73));
            colors.TryAdd(BrushKey.ForegroundInHighlight, FromRGB(0xff, 0xff, 0xff));
            colors.TryAdd(BrushKey.ForegroundInAdaptive1, FromRGB(0x1d, 0x1e, 0x21));
            colors.TryAdd(BrushKey.ForegroundInAdaptive2, FromRGB(0x30, 0x31, 0x36));
        }

        protected override void InitializeAdaptiveBrush(Dictionary<BrushKey, uint> colors)
        {
            colors.TryAdd(BrushKey.AdaptiveLevel1, FromRGB(0xae, 0xb0, 0xb7));
            colors.TryAdd(BrushKey.AdaptiveLevel2, FromRGB(0x8d, 0x91, 0x9a));
            colors.TryAdd(BrushKey.AdaptiveLevel3, FromRGB(0x65, 0x68, 0x72));
        }
    }
}